import {get,post} from '../http'
 
export function Menu() {
    return {
        addMenu: (params:any) => {
            return post({
                url: '/hr/menu/addMenu',
                
                data:params,
            });
        },
        updateMenu: (params:any) => {
            return post({
                url: '/hr/menu/updateMenu',
                
                data:params,
            });
        },
        getMenuList: (params:any) => {
            return post({
                url: '/hr/menu/getMenuList',
                
                data:params,
            });
        },
        getAllMenu:()=>{
            return get({
                url: '/hr/menu/getAllMenu',
                
            });
        }
    };
}
 
export function User(){
    return {
        addUser: (params:any) => {
            return post({
                url: '/api/user/addUser',
                
                data:params,
            });
        },
        updateUser: (params:any) => {
            return post({
                url: '/api/user/updateUser',
                
                data:params,
            });
        },
        getUserList: (params:any) => {
            return post({
                url: '/api/user/getUserList',
                
                data:params,
            });
        }
    }
}
 
export function Role(){
    return {
        addRole: (params:any) => {
            return post({
                url: '/hr/role/addRole',
                
                data:params,
            });
        },
        updateRole: (params:any) => {
            return post({
                url: '/hr/role/updateRole',
                
                data:params,
            });
        },
        getRoleList: (params:any) => {
            return post({
                url: '/hr/role/getRoleList',
                
                data:params,
            });
        },
        getRoleMenu:(params:any) =>{
            return post({
                url: '/hr/role/getRoleMenu',
                
                data:params,
            });
        },
        getUserRole:(params:any) =>{
            return post({
                url: '/hr/role/getUserRole',
                
                data:params,
            });
        },
        addUserRole:(params:any) =>{
            return post({
                url: '/hr/role/addUserRole',
                
                data:params,
            });
        },
        deleteUserRole:(params:any) =>{
            return post({
                url: '/hr/role/deleteUserRole',
                
                data:params,
            });
        },
    }
}